package demo;

import demo.things.TestPaper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

@Controller
//@Order(10)
public class Student {
//    @Autowired
    @Resource
    private TestPaper testPaper;

    public Student() {
        System.out.println("do student.init()");
    }

    public void sayHi() {
        System.out.println("student: hi");
    }

    public void getTestPaper() {
        System.out.println("testPaper: [" + testPaper.getSubject() + ", " + testPaper.getTime() + "]");
    }
}
